# Echo server program
import socket

HOST = ''                 # Symbolic name meaning the local host
PORT = 5007               # Arbitrary non-privileged port
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((HOST, PORT))
#ssl_sock = socket.ssl(s, None, None)
ssl_sock = socket.ssl(s)
s.listen(1)
conn, addr = s.accept()
print 'Connected by', addr
while 1:
    data = conn.recv(1024)
    if not data: print 'No message'
    print 'Reseived message', data
    inp = '<body>Hi <H6>World </H6><em>corsive</em>yy!</body>'
    conn.send(inp)
conn.close()
